<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<style type="text/css">
.dateWidth1{
   width:195px;
}
.select_width{
   width:130px;
}
</style>
<x:parse xml="${param.xmlstr}" var="xmlData" />

<table class="t_css" width="100%" border="0" cellpadding="0" id="basicInfo"
	cellspacing="1">
	<tr class="li_1">
		<td   colspan="4" class="t_bar2">基本信息</td>
		
	</tr>
	<tr class="li_2">
		<td   align="right" width="20%"><span class="color_red">*</span>项目名称：</td>
		<td  colspan="3">
			<input id="zh_title" name="proposal/zh_title" label="项目名称" type="text" required class="input_css required maxlength:100"  style="width: 725px;" maxlength="100" value="<x:out select="$xmlData/data/proposal/zh_title" />"/> 
		</td>
	</tr>
	<tr class="li_1">
		<td   align="right" width="20%">项目类别：</td>
		<td  colspan="3">
			<x:out select="$xmlData/data/proposal/sub_grant_name" /> 
		</td>
	</tr>
	 
	<tr class="li_2">
	<td  align="right" nowrap><span class="color_red">*</span>申报领域：</td>
	<td colspan="3">
			 <c:set var="grantCode"><x:out select="$xmlData/data/proposal/grant_code" /></c:set>
			<c:set var="sub"><x:out select="$xmlData/data/proposal/sub_grant_code" /></c:set>
			<c:set var="domain">{'id':'<x:out select="$xmlData/data/proposal/domain_value" />','name':'<x:out select="$xmlData/data/proposal/domain_name" />'}</c:set>
          	<cpt:tree key="domain1" cacheable="false" className="hn_iuput_kuang gray" readonly="true" value="${domain}"  label="申报领域"
          		id="domain" showPattern="current" shieldPattern="0" topCheckbox="false" onClick="initTreeValue3" sqlParamVal="{grant_code:${sub},stat_year:${param.statYear}}"/>
	        <input id="domain_value" type="hidden" name="proposal/domain_value" class="required" label="申报领域" value="<x:out select="$xmlData/data/proposal/domain_value" />"/>
            <input id="domain_name" type="hidden" name="proposal/domain_name"  value="<x:out select="$xmlData/data/proposal/domain_name" />"/>
	</td>
	</tr>
	<!-- <tr style="display:none"></tr> -->
	<tr class="li_1">
	<td align="right"><span class="color_red">*</span>学科名称：</td>
   <td  colspan="3">
          	<c:set var="subject">{'id':'<x:out select="$xmlData/data/proposal/subject_code" />','name':'<x:out select="$xmlData/data/proposal/subject_name" />'}</c:set>
          	<cpt:tree key="medically" cacheable="false" className="hn_iuput_kuang gray" readonly="true" value="${subject}"  label="学科名称"
          		id="subject" showPattern="current" shieldPattern="0" topCheckbox="false" onClick="initTreeValue2" />
	        <input id="subject_code" type="hidden" name="proposal/subject_code" class="required" label="学科名称" value="<x:out select="$xmlData/data/proposal/subject_code" />"/>
            <input id="subject_name" type="hidden" name="proposal/subject_name"  value="<x:out select="$xmlData/data/proposal/subject_name" />"/>
   </td>
	</tr>
	<tr class="li_2">
		<td align="right"><span class="color_red">*</span>归口管理部门：</td>
		<td colspan="3">
			<c:set var="recomend_org"><x:out select="$xmlData/data/proposal/recomend_org_value" /></c:set>
			<c:set var="sqOrgCode"><x:out select="$xmlData/data/organizations/organization[@submit_org=1]/org_code"/></c:set>
			<cpt:select id="recomend_org" sqlParamVal="{currentorgcode:${sqOrgCode }}"  key="proposal_tjbm"  value="${recomend_org}" onChange="initControlValue(this.id);"></cpt:select>
			<input type="hidden" id="recomend_org_value" name="proposal/recomend_org_value" class="required" value="${recomend_org}" label="归口管理部门">
			<input type="hidden" name="proposal/recomend_org_name" value="<x:out select="$xmlData/data/proposal/recomend_org_name" />">
		</td>
	</tr>
	<tr class="li_1">
		<td align="right"><span class="color_red">*</span>省级科技成果登记号：</td>
		<td nowrap  colspan="3"  >
		 		<input  name="proposal/reg_no" label="省级科技成果登记号"  type="text" class="input_css required maxlength:50"   maxlength="50" style="width: 120px;"  value="<x:out select="$xmlData/data/proposal/reg_no" />"/>
		</td>
	</tr>
	
	<tr class="li_2">
	    <td  align="right" nowrap width="20%">注册资本（万元）：</td>
		<td colspan="1">
			<span
			name="organizations/organization[0]/registe_fund"> <x:out
					select="$xmlData/data/org_basic_info/registe_fund" />万<x:out
					select="$xmlData/data/organizations/organization[@submit_org=1]/registe_fund_money_name" />
			</span>
		
		</td>
		 <td  align="right" nowrap width="20%"><span class="color_red">*</span>无形资产评估值（万元）：<br/>（其中技术部分）</td>
		<td colspan="1">
				<input type="text" id="reg_amt_tec" name="proposal/reg_amt_tec" value="<x:out select="$xmlData/data/proposal/reg_amt_tec" />" label="无形资产评估值" class="required" style="text-align: right;" onfocus="InitInput.setNumber(this,7,4,2);" />
		</td>
	</tr>
	
	<tr class="li_1">
	    <td  align="right" nowrap width="20%">注册时间：</td>
		<td colspan="1">
			<span
				name="organizations/organization[0]/registe_date"> <x:out
						select="$xmlData/data/organizations/organization[@submit_org=1]/registe_date" />
			</span>
		
		</td>
	    <td align="right" nowrap width="20%">增资扩股时间：</td>
		<td colspan="1">
			<c:set var="expand_date"><x:out select="$xmlData/data/proposal/expand_date" /></c:set>
			<cpt:date id="expand_date" name="proposal/expand_date" value="${expand_date}" className=" date " label="增资扩股时间"></cpt:date> 
			
		</td>
	</tr>
	 
	
	<tr class="li_2">
		<td  align="right">项目负责人：</td>
		<td>
		    <span name="proposal/fzr_psnname" ><x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/basic_info/zh_name" /></span>
		</td>
		<td  align="right">性别：</td>
		<td>
			 <c:set var="gender_value"><x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/basic_info/gender_value" /></c:set> 
		    <span name="proposal/fzr_gender_name" ><c:if test="${gender_value == 'M' }">男</c:if><c:if test="${gender_value == 'F' }">女</c:if></span>
		</td>
		
	 </tr> 
	<tr class="li_1">
		<td  align="right">职务：</td>
		<td  >
		<span name="proposal/fzr_position" ><x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/basic_info/position" /></span>
		</td>
		<td  align="right">职称：</td>
		<td  >
		<span name="proposal/fzr_prof_title_name"><x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/basic_info/prof_title_name" /></span>
		</td>
	</tr> 
	<tr class="li_2">
		<td  align="right">从事专业：</td>
		<td  >
			<span name="proposal/major_work" ><x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/major_work" /></span>
		</td>
		<td  align="right">办公电话：</td>
		<td  >
			<span name="proposal/fzr_tel" ><x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/tel_work" /></span>
		</td>
	</tr> 
	<tr class="li_1">	
		<td  align="right">手机号码：</td>
		<td  >
			<span name="proposal/fzr_mobile" ><x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/mobile" /></span>
		</td>
		<td  align="right">传真：</td>
		<td  >
		<span name="proposal/fzr_fax" ><x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/fax" /></span>
		</td>
	</tr>
	
	<tr class="li_2">	
		<td  align="right">电子邮箱：</td>
		<td  colspan="3">
		<span name="proposal/fzr_mail"><x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/email" /></span>
		</td>
	</tr> 
	 
	<tr class="li_1">
	<td  align="right" nowrap><span class="color_red">*</span>开始日期：</td>
		<td >
			<c:set var="start_date"><x:out select="$xmlData/data/proposal/start_date" /></c:set>
			<cpt:date id="start_date" name="proposal/start_date" value="${start_date}" className="required date  dateCompare:end_date" label="项目开始日期" ></cpt:date> 
		</td>
		<td  align="right" nowrap width="120px;"><span class="color_red">*</span>结束日期：</td>
		<td>
			<c:set var="end_date"><x:out select="$xmlData/data/proposal/end_date" /></c:set>
			<cpt:date id="end_date" name="proposal/end_date" className="required date" label="项目结束日期"  value="${end_date}" ></cpt:date> 
		</td>
	</tr>
	<tr class="li_2">
	    <td  align="right" nowrap width="20%"><span class="color_red">*</span>申报日期：</td>
		<td colspan="3">
			<c:set var="submit_date"><x:out select="$xmlData/data/proposal/submit_date" /></c:set>
			<cpt:date id="submit_date" name="proposal/submit_date" value="${submit_date}" className=" required date" label="申报日期"></cpt:date> 
		</td>
	</tr>
	</table>
	
	<!-- 合作单位 -->
   <jsp:include page="../org/prporg_hzdw.jsp">
		<jsp:param value="${param.xmlstr}" name="xmlstr" />
	</jsp:include>
	 
<table class="t_css" width="100%" border="0" cellpadding="0" cellspacing="1" id="psn">
<tr>
		<td    class="t_bar2" colspan="8">人员信息</td>
	</tr>
<tr>
		<td  align="right" ><span class="color_red">*</span>项目联系人：</td>
		<td  >
			<input size="12"  name="proposal/contact_psn_cname" label="项目联系人姓名" type="text" required class="input_css required"   maxlength="100" value="<x:out select="$xmlData/data/proposal/contact_psn_cname" />"/> 
		</td>
		<td  align="right"><span class="color_red">*</span>联系电话：</td>
		<td  >
			<input  name="proposal/contact_psn_tel" label="项目联系人联系电话" type="text" required class="input_css required"   maxlength="50" value="<x:out select="$xmlData/data/proposal/contact_psn_tel" />"/> 
		</td>
		<td  align="right"><span class="color_red">*</span>手机号码：</td>
		<td  >
			<input  name="proposal/contact_psn_mobile" label="项目联系人手机号码" type="text" required maxlength="11" required class="input_css required mobile"   maxlength="20" value="<x:out select="$xmlData/data/proposal/contact_psn_mobile" />"/> 
		</td>
		<td  align="right"><span class="color_red">*</span>电子邮箱：</td>
		<td  >
			<input  name="proposal/contact_psn_email" label="项目联系人电子邮箱" type="text" required class="input_css required email"   maxlength="100" value="<x:out select="$xmlData/data/proposal/contact_psn_email" />"/> 
		</td>
	</tr>
	
</table>
<script type="text/javascript">
$(function(){
	cydw('org1');
	cydw('org2');
	$("#basicInfo tr:even").addClass("li_1");
	$("#basicInfo tr:odd").addClass("li_2");
})
function cydw(id){
	var count =0 ;
	$("#"+id).find("input[type='text']").each(function(){
		if($.trim($(this).val()) != ''){
			count +=1;
		}
	});
	if(count != 0){
		$("#"+id).find("input[type='text']").each(function(){
			$(this).addClass("required");
		});
		$("#"+id).find("span[id^='color']").each(function(){
			$(this).css('display','');
		});
	}else{
		$("#"+id).find("input[type='text']").each(function(){
			$(this).removeClass("required");
	});
		$("#"+id).find("span[id^='color']").each(function(){
			$(this).css('display','none');
		});
	}
}

function setProjectPlace(op){
	var address = $("#address_value").val();
	if(op) address = '${address}';
	$("#address_name_other").removeClass("required");
	if(address == '02'){
		$("#address_name_other_span").show();
		$("#address_name_other").css("display","");
		$("#address_name_other").addClass("required");
	}else{
		$("#address_name_other_span").hide();
		$("#address_name_other").removeClass("required");
		$("#address_name_other").val("");
	}
}
function initTreeValue2CallBack(){
	cydw('org1');
	cydw('org2');
}
function setEmptyValueForTree(id){
	$("#"+id).val("");
	$("#"+id+"_hideId").val("");
	$("#"+id+"_hideName").val("");
	$("#"+id+"_code").val("");
	$("#"+id+"_value").val("");
	$("#"+id+"_name").val("");
	$("#"+id + ",[name$='/"+id+"_code']" + ",[name$='/"+id+"_name'],[name$='/"+id+"_value']").val("");
	$("#sqdm").val("");
	cydw('org1');
	cydw('org2');
}

</script>

